This plugin auto-generates written book items with recipes written in them.
Books are configured and stored in /plugins/RecipeManager/books/ as .yml files.
You can create new books just by creating a new .yml file in that folder but unlike recipes that folder does not support sub-folders.
The book's filename defines the book's ID which will be used to identify books even if they're renamed.
This is useful when editing books that players already have which the plugin will automatically update, if you edit the file name their old book items will not be updated anymore.
A book's .yml file can have:
Note that a book can not contain the same recipe twice.
'title' (optional, default file name) must not be longer than 64 characters, supports colors.
'author' (optional, default "RecipeManager"), must not be longer than 64 characters, supports colors.
'description' (optional, default nothing) must not be longer than 100 characters, supports colors.
'pervolume (optional, default 50) defines the max amount of recipes per volume the 'recipes' node allocates.
This does not limit you from adding more recipes in volumes.
'cover', 'contents' and 'end' (optional, default all true) toggle if the cover, contents or end pages are generated for the book.
You can toggle them any time, but you need to reload the books for them to have effect.
'customend' sets a custom text for the last page, only works if 'end' is true. Supports colors and \n for newlines.
Then you can use 'recipes' node to list the recipes you want to add or use special arguments (see below).
Once 'recipes' is defined and book is loaded, the node will be deleted and will auto-generate the volumes according to the recipe-per-volume limit.
You can add the 'recipes' node again to append recipes to the existing volumes automatically, or you can just add them directly to the volumes you want.
To add recipes to a book, give it a custom name or use the @addtobook flag.
Recipe names must be unique when defined in their recipe files, but if recipes do not have a name defined they will have a uniquely generated name.
That generated name contains the recipe type, its ingredient(s) and its result(s).
You can also use special arguments to add a lot of recipes at once, the available special arguments are:
+existing <all/workbench/smelt/fuel>
This is replaced by existing recipes matching the type specified.
Using 'all' will add workbench, smelt and fuel recipes in order.
+custom <all/workbench/smelt/fuel>
This is replaced by custom recipes (added with this plugin) matching the type specified.
Using 'all' will add workbench, smelt and fuel recipes in order.
+file </path/to/file.ext>
+folder </path/to/folder>
These are replaced by the recipes defined in the recipe file defined or the recipe files from the defined folder.
Paths are relative to '/plugins/RecipeManager/recipes' so defining '/' as path would mean the root of 'recipes' folder.
Once the book is loaded by the server, these arguments will be replaced in the file with the recipes they find.
If you use any +argument in 'recipes' node they will be automatically distributed throughout volumes as defined by the 'recipes-per-volume' limit. However, if you add them directly to volumes they will be added to that volume directly because you are not bound by the volume limit, only the 'recipes' node is.
Also, when a book file is loaded it will have a header comment appended to it specifying the last date/time it was read.
After adding your recipes you can just move them around or remove them if you want.
Now your book should be ready.
To see available recipe books type 'rmbooks' in server console or as an operator.
You can use @getrecipebook flag in a recipe to craft a recipe book.
Additionally, you can get books with the 'rmgetbook' command, available to operators.
Example book: 'swords.yml'
Which, after using reload, rmreload or rmreloadbooks command, the book's contents will be converted to:
NOTE You're not supposed to write the auto-generated recipe names manually!
As said before, you can give them a custom name or use the @addtobook flag.
For existing recipes you can use the +existing special argument to get all the names then remove the ones you don't need.
After that you can still change its contents, rearrange recipes, remove recipes, change its title, description, whatever you want!
Just be sure that you do not rename the file if people already have copies of the book, in that case their books won't update!